﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.Json.Serialization;
using System.Threading.Tasks;

namespace BuddHa.Camera.Protcol.HK.Models
{
    /// <summary>
    /// 查询编码设备列表v2
    /// </summary>
    public class DeviceSearchModel : BaseModel
    {
        public DeviceSearchModel() : base("/artemis/api/resource/v2/camera/search", EnumRequestMethod.Post)
        {

        }

        public class DeviceSearchRequest
        {

            [JsonPropertyName("pageNo")]
            public int PageNo { get; set; }

            [JsonPropertyName("pageSize")]
            public int PageSize { get; set; }
        }

        public class DeviceSearchResponse
        {
            [JsonPropertyName("total")]
            public int Total { get; set; }

            [JsonPropertyName("pageNo")]
            public int PageNo { get; set; }

            [JsonPropertyName("pageSize")]
            public int PageSize { get; set; }

            [JsonPropertyName("list")]
            public List<ListModel> List { get; set; }
        }

        public class ListModel
        {
            /// <summary>
            /// 唯一编码
            /// </summary>
            [JsonPropertyName("indexCode")]

            public string IndexCode { get; set; }

            /// <summary>
            /// 资源类型，camera：监控点
            /// </summary>
            [JsonPropertyName("resourceType")]
            public string ResourceType { get; set; }

            /// <summary>
            /// 监控点国标编号
            /// </summary>
            [JsonPropertyName("externalIndexCode")]
            public string ExternalIndexCode { get; set; }

            /// <summary>
            /// 资源名称
            /// </summary>
            [JsonPropertyName("name")]
            public string Name { get; set; }

            /// <summary>
            /// 通道号，为级联监控点时，该字段为空；本级监控点时，该字段非空
            /// </summary>
            [JsonPropertyName("chanNum")]
            public int ChanNum { get; set; }

            /// <summary>
            /// 级联编号
            /// </summary>
            [JsonPropertyName("cascadeCode")]
            public string CascadeCode { get; set; }

            /// <summary>
            /// 父级资源编号
            /// </summary>
            [JsonPropertyName("parentIndexCode")]
            public string ParentIndexCode { get; set; }

            /// <summary>
            /// 经度
            /// </summary>
            [JsonPropertyName("longitude")]
            public string Longitude { get; set; }

            /// <summary>
            /// 纬度
            /// </summary>
            [JsonPropertyName("latitude")]
            public string Latitude { get; set; }

            /// <summary>
            /// 海拔高度
            /// </summary>
            [JsonPropertyName("Elevation")]
            public string Elevation { get; set; }

            /// <summary>
            /// 监控点类型 0 : 枪机 1 : 半球 2 : 快球 3 : 带云台枪机3 
            /// </summary>
            [JsonPropertyName("CameraType")]
            public int CameraType { get; set; }

            /// <summary>
            /// 能力集
            /// </summary>
            [JsonPropertyName("capability")]
            public string Capability { get; set; }


            /// <summary>
            /// 录像存储位置
            /// </summary>
            [JsonPropertyName("recordLocation")]
            public string RecordLocation { get; set; }

            /// <summary>
            /// 通道子类型，
            /// 模拟通道analog
            /// 数字通道digital
            /// 镜像通道mirror
            /// 录播通道record
            /// 零通道zero
            /// </summary>
            [JsonPropertyName("channelType")]
            public string ChannelType { get; set; }

            /// <summary>
            /// 所属区域
            /// </summary>
            [JsonPropertyName("regionIndexCode")]
            public string RegionIndexCode { get; set; }

            /// <summary>
            /// 所属区域路径,以@符号分割，包含本节点
            /// </summary>
            [JsonPropertyName("regionPath")]
            public string RegionPath { get; set; }

            /// <summary>
            /// 传输协议
            /// </summary>
            [JsonPropertyName("transType")]
            public int TransType { get; set; }

            /// <summary>
            /// 资源唯一编码
            /// </summary>
            [JsonPropertyName("ResourceIndexCode")]
            public string ResourceIndexCode { get; set; }

            /// <summary>
            /// 所属区域路径
            /// </summary>
            [JsonPropertyName("regionName")]
            public string RegionName { get; set; }

            /// <summary>
            /// 区域路径名称
            /// </summary>
            [JsonPropertyName("regionPathName")]
            public string RegionPathName { get; set; }


        }
    }
}
